{template '_header'}
<div class="page-heading"> <h2>基础设置</h2> 

</div>


<form id="setform"  {ifp 'merch.set.edit'}action="" method="post"{/if} class="form-horizontal form-validate">

    <input type="hidden" id="tab" name="tab" value="#tab_basic" />
    <div class="tabs-container">
		 <ul class="nav nav-tabs" id="myTab">
			<li {if empty($_GPC['tab']) || $_GPC['tab']=='basic'}class="active"{/if}><a href="#tab_basic">基本</a></li>
			<li {if $_GPC['tab']=='enter'}class="active"{/if}><a href="#tab_enter">入驻设置</a></li>
			<li {if $_GPC['tab']=='web'}class="active"{/if}><a href="#tab_web">多商户端</a></li>
			<li {if $_GPC['tab']=='protocol'}class="active"{/if}><a href="#tab_protocol">入驻申请协议</a></li>
		</ul>
		<div class="tab-content ">
			<div class="tab-pane {if empty($_GPC['tab']) || $_GPC['tab']=='basic'}active{/if}" id="tab_basic">{template 'merch/set/basic'}</div>
			<div class="tab-pane {if $_GPC['tab']=='enter'}active{/if}" id="tab_enter">{template 'merch/set/enter'}</div>
			<div class="tab-pane {if $_GPC['tab']=='web'}active{/if}" id="tab_web">{template 'merch/set/web'}</div>
			<div class="tab-pane {if $_GPC['tab']=='protocol'}active{/if}" id="tab_protocol">{template 'merch/set/protocol'}</div>
		<!-- </div> -->
	</div>
{ifp 'merch.set.edit'}
    <div class="form-group">
		<label class="col-sm-2 control-label"></label>
		<div class="col-sm-9 col-xs-12">
			<input type="submit"  value="提交" class="btn btn-primary" />
		</div>
    </div>
{/if}

</form> 
<!-- 点击复制链接 -->
<script>
  function shareURL(text){

  copyToClipboard(text);


}

function copyToClipboard(content){

  try{

      var aux = document.createElement("input");

      aux.setAttribute("value",content);

      document.body.appendChild(aux);

      aux.select();
    
      document.execCommand("copy");

      document.body.removeChild(aux);

      alert("复制成功！");
   }catch(error){
     alert("链接复制失败！");
  }

}
</script> 

<script language='javascript'>
        require(['bootstrap'], function () {
            $('#myTab a').click(function (e) {
                $('#tab').val($(this).attr('href'));
                e.preventDefault();
                $(this).tab('show');
            })
        });

        $(function () {
            $('.open_apply').click(function () {
                var type = $(".open_apply:checked").val();
                if (type == '1') {
                    $('.protocol-group').show();
                } else {
                    $('.protocol-group').hide();
                }
            })
        });
		          
</script>
{template '_footer'}